feat(linter): support disable directives for type aware rules#14052
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
f67a39e to
b093549
Compare
41ea359 to
d63f550
Compare
CodSpeed Performance ReportMerging #14052 will not alter performanceComparing Summary
Footnotes
|
42e96b5 to
f9fbad1
Compare
f9fbad1 to
6602e89
Compare
d63f550 to
9222f33
Compare
6602e89 to
0a2a774
Compare
9222f33 to
f009d6f
Compare
4196bea to
78b185a
Compare
f009d6f to
ba4fd63
Compare
ba4fd63 to
0dc71c1
Compare
78b185a to
79eadf8
Compare
0dc71c1 to
8bf5013
Compare
f4a928e to
d492f10
Compare
c052b04 to
b842366
Compare
Merge activity
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements support for disable directives (like eslint-disable and oxlint-disable) for type-aware rules, addressing issue #13941. The implementation adds centralized disable directives handling that works across both regular oxc linting and type-aware tsgolint linting.
Key changes:
- Centralized disable directives coordination through a new
DirectivesStorethat manages shared state between linting engines - Enhanced
LintRunnerto collect disable directives during regular linting and apply them to type-aware linting - Integration of disable directive checking in
TsGoLintStateto filter out suppressed diagnostics
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
editors/vscode/tests/code_actions.spec.ts |
Temporarily disabled test related to unused disable directives configuration |
crates/oxc_linter/src/tsgolint.rs |
Added disable directives filtering for type-aware linting diagnostics |
crates/oxc_linter/src/service/runtime.rs |
Modified to collect and store disable directives during linting |
crates/oxc_linter/src/service/mod.rs |
Added method to set disable directives map on lint service |
crates/oxc_linter/src/lint_runner.rs |
Added new DirectivesStore for centralized disable directives management |
crates/oxc_linter/src/lib.rs |
Exposed disable directives utilities and modified linter to return directives |
crates/oxc_linter/src/disable_directives.rs |
Added utility function to create unused directives diagnostics |
crates/oxc_linter/src/context/host.rs |
Added method to extract disable directives from context host |
crates/oxc_language_server/src/snapshots/* |
Updated test snapshots to reflect removal of fix suggestions for unused directives |
crates/oxc_language_server/src/linter/* |
Updated language server linting to handle disable directives |
apps/oxlint/src/snapshots/* |
Added test snapshots for disable directives with type-aware rules |
apps/oxlint/src/lint.rs |
Modified to use new lint runner API and report unused directives |
apps/oxlint/fixtures/tsgolint_disable_directives/* |
Added test fixtures for disable directives functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
b4142df to
d2992b7
Compare
|
Bravo! |

fixes #13491